﻿using System;
using System.Collections.Generic;
using System.Linq;
using Database.Context;
using Database.Models;

namespace QuanLyThongTinCoSo.Biz
{
    public class LoaiNguonNuocBiz:BaseBiz
    {
        public LoaiNguonNuocBiz()
        {
            DbContext = new Context();
        }

        public LoaiNguonNuocBiz(Context context)
        {
            DbContext = context;
        }

        public override void Insert(BaseModel model)
        {
            throw new NotImplementedException();
        }

        public override void Update(BaseModel model)
        {
            throw new NotImplementedException();
        }

        public override void Delete(BaseModel model)
        {
            throw new NotImplementedException();
        }

        public override void DeleteItems(List<BaseModel> models)
        {
            throw new NotImplementedException();
        }

        public override BaseModel GetItemById(int id)
        {
            throw new NotImplementedException();
        }

        #region GetAll

        public List<LoaiNguonNuoc> GetAll()
        {
            return DbContext.LoaiNguonNuocs.OrderBy(item => item.Ten).ToList();
        }

        #endregion
    }
}
